1. Field of the Invention
The present invention relates to an imaging system and a microscope imaging system for capturing subject images or images observed with a microscope with an image pickup device such as a CCD, and for displaying and recording the images, and to an image processing system used in the above systems. The present invention particularly relates to color compensation processing and contrast correction processing of the systems.
2. Description of the Related Art
Conventionally, a method for colometrically improving color reproductivity by using tristimulus values of a subject in image processing systems, imaging systems, and microscope imaging systems has been widely known. However, because this method does not take human visual perception property into account, problems such as foggy images and differences in color from the original colors have been frequently pointed out.
Japanese Patent Application Publication No. 2005-117612 and Japanese Patent Application Publication No. 2005-210370 disclose techniques that are methods for improving the visual quality while taking the human visual perception property into account.
The techniques in these documents employ processing based on CIECAM02, which is a CIE Color Appearance Model (CIECAM) of the International Commission on Illumination (CIE), in order to improve the visual quality.
The processing based on the CIECAM02 is computed with the following formula. First, the observation environment is classified into three surrounds: Average, Dim, and Dark. Given that the luminance of the white color around the observation subject is LSW, the luminance of the white color of the observation subject is LDW, and SR=LSW/LDW, the surround is Average at SR≧0.2, is Dim at 0≦SR<0.2, and is Dark at SR=0.
For each of the surrounds, c, Nc, and F are determined by the table below.
SurroundcNcFAverage0.691.01.0Dim0.590.90.9Dark0.5250.80.8In order to convert the tristimulus values XYZ into lightness J, Chroma C, and hue angle h by means of CIECAM02, the tristimulus values are first converted into RGB spaces with an MCAT02 matrix.
                              (                                                    R                                                                    G                                                                    B                                              )                =                              M                          CAT              ⁢                                                          ⁢              02                                ·                      (                                                                                                                              X                                                                                                            Y                                                                                                                                          Z                                                      )                                              (        1        )                                          M                      CAT            ⁢                                                  ⁢            02                          =                  (                                                                      0.7328                                                                                                  -                    0.7036                                                                                                0.0030                                                      ⁢                                                                                                                              0.4296                                                                                                            1.6975                                                                                                                                          0.0136                                                      ⁢                                                                                -                    0.1624                                                                                                0.0061                                                                              0.9834                                                              )                                    (        2        )            The degree of incomplete chromatic adaptation D is calculated next.
                    D        =                  F          ·                      [                          1              -                                                (                                      1                    3.6                                    )                                ·                                  exp                  ⁡                                      [                                                                  -                                                  (                                                                                    L                              A                                                        +                            42                                                    )                                                                    92                                        ]                                                                        ]                                              (        3        )            Chromatic adaptation is calculated by using D.RC=[(YW·D/RW)+(1−D)]·R  (4)GC=[(YW·D/GW)+(1−D)]·G  (5)BC=[(YW·D/BW)+(1−D)]·B  (6)Here, RW, GW, and BW are RGB values of the white color of an observation subject, and the white color tristimulus values RW, GW, and BW are multiplied with an MCAT02 matrix.
Next, observation condition parameters are calculated.k=1/(5LA+1)  (7)FL=0.2k4(5LA)+0.1(1−k4)2(5LA)1/3  (8)n=Yb/YW  (9)Nbb=Nch=0.725(1/n)0.2  (10)z=1.48+√{square root over (n)}  (11)
The values obtained from Equation (4) through Equation (6) are converted into Hunt-Pointer-Estevez space.
                              (                                                                      R                  ′                                                                                                      G                  ′                                                                                                      B                  ′                                                              )                =                              M            HPE                    ·                      M                          CAT              ⁢                                                          ⁢              02                                      -              1                                ·                      (                                                                                                                                                        R                          C                                                                                                                                                              G                          C                                                                                                                                                                                      B                    C                                                                        )                                              (        12        )                                          M          HPE                =                  (                                                                      0.38971                                                                                                  -                    0.22981                                                                                                0.00000                                                      ⁢                                                                                                                              0.68898                                                                                                            1.18340                                                                                                                                          0.00000                                                      ⁢                                                                                -                    0.07868                                                                                                0.04641                                                                              1.00000                                                              )                                    (        13        )                                          M                      CAT            ⁢                                                  ⁢            02                                -            1                          =                  (                                                                      1.096124                                                                              0.454369                                                                                                  -                    0.009628                                                                        ⁢                                                                                                                                                        -                          0.278869                                                                                                                                    0.473533                                                                                                                                                              -                    0.005698                                                                        ⁢                                                            0.182745                                                                              0.072098                                                                              1.015326                                                              )                                    (        14        )            
A nonlinear transform is applied to R′, G′, and B′.
                              R          a          ′                =                                            400              ⁢                                                (                                                            F                      L                                        ⁢                                                                  R                        ′                                            /                      100                                                        )                                0.42                                                    27.13              +                                                (                                                                                    F                        L                                            ⁢                                              R                        ′                                                              100                                    )                                0.42                                              +          0.1                                    (        15        )                                          G          a          ′                =                                            400              ⁢                                                (                                                            F                      L                                        ⁢                                                                  G                        ′                                            /                      100                                                        )                                0.42                                                    27.13              +                                                (                                                                                    F                        L                                            ⁢                                              G                        ′                                                              100                                    )                                0.42                                              +          0.1                                    (        16        )                                          B          a          ′                =                                            400              ⁢                                                (                                                            F                      L                                        ⁢                                                                  B                        ′                                            /                      100                                                        )                                0.42                                                    27.13              +                                                (                                                            F                      L                                        ⁢                                                                  B                        ′                                            /                      100                                                        )                                0.42                                              +          0.1                                    (        17        )            When R′,G′, and B′ are negative values, absolute values are used and −1 is multiplied before adding 0.1.
Next, a, b, and h are calculated.a=R′a−12G′a/11+B′a/11  (18)b=( 1/9)(R′a+G′a−2B′a)  (19)h=tan−1(b/a)  (20)hr=h·180/π  (22)h=hr if a≧0,b≧0h=hr+180 if a<0,b≧0h=hr+180 if a<0,b<0h=hr+360 if a≧0,b<0  (23)
Next, et is calculated.
                              e          t                =                  1          ⁢                      /                    ⁢                      4            ⁡                          [                                                cos                  ⁡                                      (                                                                  h                        ⁢                                                                                                  ⁢                                                  π                          180                                                                    +                      2                                        )                                                  +                3.8                            ]                                                          (        24        )            
Next, A is calculated.A=[2R′a+G′a+( 1/20)B′a−0.305]Nbb  (25)
Next, lightness J is calculated.J=100(A/AW)cz  (26)
Next, t is calculated for a calculation of C.
                    t        =                                            (                              50000                /                13                            )                        ⁢                          N              c                        ⁢                          N              cb                        ⁢                          e              t                        ⁢                                                            a                  2                                +                                  b                  2                                                                                        R              a              ′                        +                          G              a              ′                        +                                          (                                  21                  /                  20                                )                            ⁢                              B                a                ′                                                                        (        27        )            
Chroma C is calculated.C=t0.9√{square root over (J/100)}(1.64−0.29n)0.73  (28)
As given above, lightness J, chroma C and hue angle h are calculated.
Next, tristimulus values when the lightness J, chroma C and hue angle h calculated above are observed in different environments is calculated by means of an inverse transform.
First, i that results in hi≦h′≦hi+1 is selected from the following table, and its corresponding hi, ei, and Hi are obtained.
RedYellowGreenBlueRedI12345hi20.1490.00164.25237.53380.14ei0.80.71.01.20.8Hi0.0100.0200.0300.0400.0
                              h          ′                =                                                            (                                  H                  -                                      H                    i                                                  )                            ⁢                              (                                                                            e                                              i                        +                        1                                                              ⁢                                          h                      i                                                        -                                                            e                      i                                        ⁢                                          h                                              i                        +                        1                                                                                            )                                      -                          100              ⁢                              h                i                            ⁢                              e                                  i                  +                  1                                                                                                        (                                  H                  -                                      H                    i                                                  )                            ⁢                              (                                                      e                                          i                      +                      1                                                        -                                      e                    i                                                  )                                      -                          100              ⁢                              e                                  i                  +                  1                                                                                        (        29        )                                          h          =                                                    (                                                      h                    ′                                    -                  360                                )                            ⁢                                                          ⁢              if              ⁢                                                          ⁢                              h                ′                                      >            360                          ,                              otherwise            ⁢                                                  ⁢            h                    =                      h            ′                                              (        30        )            t, e, p1, p2, and p3 are calculated.
                    t        =                              (                          C                                                                    J                    /                    100                                                  ⁢                                                      (                                          1.64                      -                                              0.29                        n                                                              )                                    0.73                                                      )                                1            0.9                                              (        31        )            When t is 0, a and b are 0, and p2 only is calculated.
                              e          t                =                  1          ⁢                      /                    ⁢          4          ⁢                      (                                          cos                ⁡                                  (                                                            h                      ⁢                                              π                        180                                                              +                    2                                    )                                            +              3.8                        )                                              (        32        )                                A        =                                            A              W                        ⁡                          (                              J                /                100                            )                                            1            cz                                              (        33        )                                          p          1                =                                            (                              50000                /                13                            )                        ⁢                          N              c                        ⁢                          N              cb                        ⁢                          e              t                                t                                    (        34        )            p2=(A/Nbb)+0.305  (35)p3=21/20  (36)a and b are calculated.
                              h          r                =                  h          ⁢                      π            180                                              (        37        )            if |sin(hr)|≧|cos(hr)|p4=p1/sin(hr)  (38)
                    b        =                                                            p                2                            ⁡                              (                                  2                  +                                      p                    3                                                  )                                      ⁢                          (                              460                /                1403                            )                                                                                                                p                    4                                    +                                                            (                                              2                        +                                                  p                          3                                                                    )                                        ⁢                                                                  (                                                  220                          /                          1403                                                )                                            ⁡                                              [                                                                              cos                            ⁡                                                          (                                                              h                                r                                                            )                                                                                /                                                      sin                            ⁡                                                          (                                                              h                                                                  r                                  ⁢                                                                                                                                                                                                    )                                                                                                      ]                                                                              -                                                                                                                          (                                          27                      /                      1403                                        )                                    -                                                            p                      3                                        ⁡                                          (                                              6300                        /                        1403                                            )                                                                                                                              (        39        )            a=b[cos(hr)/sin(hr)]  (40)if |sin(hr)|<|cos(hr)|p5=p1/cos(hr)  (41)
                    a        =                                                            p                2                            ⁡                              (                                  2                  +                                      p                    3                                                  )                                      ⁢                          (                              460                /                1403                            )                                                                                                                p                    5                                    +                                                            (                                              2                        +                                                  p                          3                                                                    )                                        ⁢                                          (                                              220                        /                        1403                                            )                                                        -                                                                                                                          [                                                                  (                                                  27                          /                          1403                                                )                                            -                                                                        p                          3                                                ⁡                                                  (                                                      6300                            /                            1403                                                    )                                                                                      ]                                    ⁡                                      [                                                                  sin                        ⁡                                                  (                                                      h                            r                                                    )                                                                    /                                              cos                        ⁡                                                  (                                                      h                                                          r                              ⁢                                                                                                                                                                            )                                                                                      ]                                                                                                          (        42        )            b=a[sin(hr)/cos(hr)]  (43)
                              R          a          ′                =                                            460              1403                        ⁢                          p              2                                +                                    451              1403                        ⁢            a                    +                                    288              1403                        ⁢            b                                              (        44        )                                          G          a          ′                =                                            460              1403                        ⁢                          p              2                                -                                    891              1403                        ⁢            a                    -                                    261              1403                        ⁢            b                                              (        45        )                                          B          a          ′                =                                            460              1403                        ⁢                          p              2                                -                                    220              1403                        ⁢            a                    -                                    6300              1403                        ⁢            b                                              (        46        )            R′, G′, and B′ are calculated.
                              R          ′                =                              100                          F              L                                ⁢                                    (                                                27.13                  ⁢                                                                                                        R                        a                        ′                                            -                      0.1                                                                                                            400                  -                                                                                                        R                        a                        ′                                            -                      0.1                                                                                                      )                                      1              0.42                                                          (        47        )                                          G          ′                =                              100                          F              L                                ⁢                                    (                                                27.13                  ⁢                                                                                                        G                        a                        ′                                            -                      0.1                                                                                                            400                  -                                                                                                        G                        a                        ′                                            -                      0.1                                                                                                      )                                      1              0.42                                                          (        48        )                                          B          ′                =                              100                          F              L                                ⁢                                    (                                                27.13                  ⁢                                                                                                        B                        a                        ′                                            -                      0.1                                                                                                            400                  -                                                                                                        B                        a                        ′                                            -                      0.1                                                                                                      )                                      1              0.42                                                          (        49        )            If any one of (R′a−0.1), (G′a−0.1), or (B′a−0.1) is a negative value, the corresponding R′, G′, or B′ is also a negative value.RC, GC, and BC are calculated.
                              (                                                                      R                  c                                                                                                      G                  c                                                                                                      B                  c                                                              )                =                              M                          CAT              ⁢                                                          ⁢              0              ⁢                                                          ⁢              2                                ·                      M            HPE                          -              1                                ·                      (                                                                                R                    ′                                                                                                                    G                    ′                                                                                                                    B                    ′                                                                        )                                              (        50        )                                          M          HPE                      -            1                          =                  (                                                    1.910197                                                              -                  1.112124                                                            0.201908                                                                    0.370950                                            0.629054                                                              -                  0.000008                                                                                    0.000000                                            0.000000                                            1.000000                                              )                                    (        51        )            Finally, RGB and XYZ are calculated.
                    R        =                              R            c                                (                                                            Y                  W                                ⁢                                  D                  /                                      R                    W                                                              +              1              -              D                        )                                              (        52        )                                G        =                              G            c                                (                                                            Y                  W                                ⁢                                  D                  /                                      G                    W                                                              +              1              -              D                        )                                              (        53        )                                B        =                              B            c                                (                                                            Y                  W                                ⁢                                  D                  /                                      B                    W                                                              +              1              -              D                        )                                              (        54        )                                          (                                                    X                                                                    Y                                                                    Z                                              )                =                              M                          CAT              ⁢                                                          ⁢              0              ⁢                                                          ⁢              2                                      -              1                                ⁡                      (                                                            R                                                                              G                                                                              B                                                      )                                              (        55        )            
From the above calculations, the tristimulus values XYZ that reflect the visual effect of the second observation environment can be obtained.